﻿@model IEnumerable<StudentModel>
@{
    Layout = "_Layout";
    ViewBag.Title = "学生详情列表";   
    
}

<div class="card-deck d-flex flex-wrap">
    @foreach (var student in Model)
    {
        var photoPath = "~/images/" + (@student.PhotoPath ?? "wala.jpg");
        <div class="card m-3" style="width:30%">
            <div class="card-hread">
                <h3>@student.Name</h3>
            </div>

            <img width="200" height="250" class="card-img-top" src="@photoPath" asp-append-version="true" />
            <div class="card-footer text-center">

            <a asp-controller="home" asp-action="DetailsView" asp-route-id="@student.Id" class="btn btn-primary">查看</a>
            <a asp-controller="home" asp-action="Edit" asp-route-id="@student.Id" class="btn btn-primary">编辑</a>
                <a asp-controller="home" asp-action="Delete" asp-route-id="@student.Id" class="btn btn-danger">删除</a>
        </div>
    </div>
    }
</div>


@section Scripts {
    <script src="~/js/customscript.js"></script>
}
